package com.wetool.wechat.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;

@Getter
public class ActionInfo {

    private Scene scene;

    public ActionInfo(int sceneId) {
        this.scene = new Scene(sceneId);
    }

    public ActionInfo(String sceneStr) {
        this.scene = new Scene(sceneStr);
    }

    @Getter
    public class Scene {

        public Scene(int sceneId) {
            this.sceneId = sceneId;
        }

        public Scene(String sceneStr) {
            this.sceneStr = sceneStr;
        }

        /**
         * 场景值ID，临时二维码时为32位非0整型，永久二维码时最大值为100000（目前参数只支持1--100000）
         */
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        @JsonProperty(value = "scene_id")
        private int sceneId;

        /**
         * 场景值ID（字符串形式的ID），字符串类型，长度限制为1到64
         */
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        @JsonProperty(value = "scene_str")
        private String sceneStr;
    }
}
